package softwaretest.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import softwaretest.Domain.Device;

import java.util.List;
import java.util.Optional;

public interface DeviceRepository extends JpaRepository<Device, Long> {
    // Find a device by its serial number
    Device findBySerialNumber(String serialNumber);
    Device findFirstByCategory(String category);
        List<Device> findByGreenhouse_Id(Long greenhouseId);

    // Other existing methods can be added here as needed
}